<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        body {
            position: relative;
            top: 0;
            font-family: '微软雅黑',"Times New Roman",Georgia,Serif;;
        }

        #get-ball {
            position: absolute;
            left: 50%;
            top: 0;
            transform: translate(-50%,3%);
            text-align: center;
            font-weight: 700;
        }

        pre {
            font-size: 40px;
        }

        button {
            margin-top: 35px;
            width: 200px;
            height: 50px;
            font-size: 35px;
        }
        P {
            margin-top: 5px;
        }
    </style>
    <title>getBall.js</title>
</head>

<body>
    <div id="get-ball">
        <h1>欢迎使用getBall.js</h1>
        <p>说明:可定制随机生成几乎所有彩票</p>
        <p>作者:Goog丶2021 版本: 0.0.1</p>
        <p>微信:yesgoog520</p>
        <pre>
    </pre>
        <button>换一组</button>
    </div>
    <!-- <script src="./js/getBall.js"></script> -->
    <script src="./js/getBall-min.js"></script>
    <script>
        const btn = document.querySelector('button')
        const pre = document.querySelector('pre')
        function test(){       
            const show = `
---------体育彩票----------
大乐透随机: ${getBall({ max: 35, places: 5 }).join(' ') + ' + ' + getBall({ min: 1, max: 12, places: 2 }).join(' ')}
七星彩随机: ${getBall({ min: 0, max: 9, places: 6, repeat: true, addZero: false }).join('') + '+' + getBall({ min: 0, max: 14, places: 1, addZero: false })}
排列三随机: ${getBall({ min: 0, max: 9, repeat: true, places: 3, addZero: false }).join('')}
---------福利彩票----------
双色球随机: ${getBall({}).join(' ') + ' + ' + getBall({ min: 1, max: 16, places: 1 })}
七乐彩随机: ${getBall({ max: 30, places: 7 }).join(' ')}
福彩3D随机: ${getBall({ min: 0, max: 9, repeat: true, places: 3, addZero: false }).join('')}
快8选10随机: ${getBall({ max: 80, places: 10 }).join(' ')}`
            pre.innerHTML = show
        
        }
        window.addEventListener('DOMContentLoaded',test)
        btn.addEventListener('click',test)
    </script>
</body>

</html>